
(define-macro/err (make-macro-cyl-list/aux cyl-macro) 
  `(if (pair? mc-cyl-l)
       (let ((cur-cyl (merge-list loc mc-cyl-l))
	     )
	 ;;(y-or-n "MACRO->aux:mc-cyl-l=~a,cur-cyl=~a.\n" mc-cyl-l cur-cyl)
	 (set! mc-cyl-l (list cur-cyl (merge-num loc cur-cyl 1) 0 '系统宏调用 (cyl-serial))))
       (exit-cyl-macro (list 'err loc (string-length last-str) '非法语法 (err-format 'cyl-macro->make-macro-cyl-list/aux loc "非法宏内容。")))))
(define-macro/err (handle-macro/macro-aux cyl-macro cyl-l str-l)
  `(begin
     (if (string? cyl-adverb-value)
	 (begin
	   (push cyl-adverb-value cyl-current-macro)
	   (let-set! (res-str loc res-cyl res-st deli-cyl) (run/err cyl-macro s (+ loc 1) cyl-adverb-value ,cyl-l ,str-l))
	   )
	 (begin
	   (push last-str cyl-current-macro)
	   (let-set! (res-str loc res-cyl res-st deli-cyl) (run/err cyl-macro s (+ loc 1) last-str))
	   ))
     (pop cyl-current-macro)
     (set! res-deli-st (nth 3 deli-cyl))
     ;;(y-or-n "handle-macro/macro:macro-list=~a,deli-cyl=~S,res-str=~a\nmc-str=~a\n" cyl-current-macro deli-cyl res-str mc-str-l)
     (cond
      ((eq? res-deli-st '结束分隔符)
       (push res-cyl mc-cyl-l)
       (push res-str mc-str-l)
       (exit-cyl-macro (list (merge-str loc mc-str-l) loc (merge-cyl loc mc-cyl-l '系统宏调用) '系统宏调用 deli-cyl))
       )
      (else
       (push res-cyl mc-cyl-l)
       (push deli-cyl mc-cyl-l)
       (push res-str mc-str-l)
       (push (nth 0 deli-cyl) mc-str-l)
       ))))
(define-macro/err (handle-key/macro-aux cyl-macro)
  `(loop
    (let-set! (res-str loc res-cyl res-st deli-cyl new-key handle-flag) (run/err cyl-key s (+ loc 1) (car cyl-current-macro) last-str))
    ;;(y-or-n "handle-key/macro-aux:macro-list=~a,res-cyl=~a,new-key=~a,deli-cyl=~a\n" cyl-current-macro res-cyl new-key deli-cyl)
    (set! res-deli-st (nth 3 deli-cyl))
    (cond
      ((and (not new-key)(eq? res-deli-st '语句终结分隔符))
       (if (eq? handle-flag 'strip)
	   (append-push (nth 0 res-cyl) mc-cyl-l)
	   (push res-cyl mc-cyl-l))
       (push res-str mc-str-l)
       (push deli-cyl mc-cyl-l)
       (push (nth 0 deli-cyl) mc-str-l)
       ;;(if (eq? res-deli-st '语句终结分隔符) (set! deli-cyl '()))
       (exit-cyl-macro (list (merge-str loc mc-str-l) loc (merge-cyl loc mc-cyl-l '系统宏调用) '系统宏调用 deli-cyl))
       )
      ((eq? res-deli-st '结束分隔符)
       (if (eq? handle-flag 'strip)
	   (append-push (nth 0 res-cyl) mc-cyl-l)
	   (push res-cyl mc-cyl-l))
       (push res-str mc-str-l)
       ;;(push deli-cyl mc-cyl-l)
       ;;(push (nth 0 deli-cyl) mc-str-l)
       ;;(if (eq? res-deli-st '语句终结分隔符) (set! deli-cyl '()))
       (exit-cyl-macro (list (merge-str loc mc-str-l) loc (merge-cyl loc mc-cyl-l '系统宏调用) '系统宏调用 deli-cyl))
       )
      (else
       (if (eq? handle-flag 'strip)
	   (append-push (nth 0 res-cyl) mc-cyl-l)
	   (push res-cyl mc-cyl-l))
       (push res-str mc-str-l)
       (push deli-cyl mc-cyl-l)
       (push (nth 0 deli-cyl) mc-str-l)
       ))
     (if new-key
	 (set! last-str new-key)
	 ;;(breakout)
	 )))
(define-macro/err (pre-handle-macro/macro-aux cyl-macro)
  `(if (string? cyl-adverb-value)
       (begin
	 (set! cyl-adverb-value #f)
	 (set! mc-cyl-l (nth 0 macro-l))
	 (set! mc-str-l (nth 1 macro-l))
	 )
       (begin
	 (push (list macro-str (string-length macro-str) macro-coding macro-type (cyl-serial)) mc-cyl-l)
	 (push macro-str mc-str-l))))
